package com.luo.backend.controller;

import com.luo.backend.common.ApiResponse;
import com.luo.backend.dto.AdminOverviewStatisticsResponse;
import com.luo.backend.service.AdminStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 管理员-统计控制器
 */
@RestController
@RequestMapping("/api/v1/admin")
public class AdminStatisticsController {
    
    @Autowired
    private AdminStatisticsService adminStatisticsService;
    
    /**
     * 获取平台概览统计
     * GET /api/v1/admin/statistics/overview
     */
    @GetMapping("/statistics/overview")
    public ApiResponse<AdminOverviewStatisticsResponse> getOverviewStatistics() {
        AdminOverviewStatisticsResponse response = adminStatisticsService.getOverviewStatistics();
        return ApiResponse.success(response);
    }
}








